// 设备查询参数
export interface DeviceQuery {
    pageNum?: number;
    pageSize?: number;
    deviceName?: string;
    deviceNo?: string;
    status?: number;
    model?: string;
    startTime?: string;
    endTime?: string;
}

// 设备位置信息
export interface DeviceLocation {
    lat: number;
    lon: number;
    geohash: string;
    fragment: boolean;
}

// 设备表单数据
export interface DeviceForm {
    id?: number;
    deviceName: string;
    deviceNo: string;
    model: string;
    status: number;
    channelCount: number;
    location?: {
        lat: number;
        lon: number;
        distance?: number;
    };
    siteName?: string;
    contactPhone?: string;
    createTime?: string;
    updateTime?: string;
}

// 设备视图对象
export interface DeviceVO extends DeviceForm {
    id: number;
    createTime: string;
    updateTime: string;
}

// 设备列表响应
export interface DeviceListResponse {
    total: number;
    list: DeviceVO[];
}

// 设备详情响应
export interface DeviceDetailResponse {
    data: DeviceVO;
}

export interface CheckStockItem {
    deviceId: number;
    channelId: number;
    productId: number;
    stock: number;
}

// 订单详情项
export interface OrderDetailItem {
    productId: number;
    productName: string;
    productImage: string;
    channelNo: string;
    channelPosition: string;
    price: number;
    quantity: number;
    subtotal: number;
    status: number;
}

// 订单优惠券
export interface OrderCoupon {
    orderId?: number;
    orderNo?: string;
    userCouponId: number;
    couponId: number;
    couponCode: string;
    couponName: string;
    couponType: number;
    discountAmount: number;
}

// 订单业务对象
export interface OrderBo {
    orderNo: string;
    userId: number;
    deviceId: number;
    totalAmount: number;
    actualAmount: number;
    discountAmount: number;
    payType: number;
    status: number;
    remark: string;
    orderDetail: OrderDetailItem[];
    orderCoupon?: OrderCoupon;
}